package Alog;

import java.util.Scanner;

/**
 * @author : niu niu
 * @version : 1.0.0
 * @date : 2022/10/18 19:29
 */
public class Test5 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        int count =0;
        for (int i = 0; i < str.length(); i++) {
            if(str.toCharArray()[i]=='1'){
                count++;
            }
        }
        System.out.println(count);
    }
}
